#  -*- coding:utf-8 -*- 
"""
@ author: 罗金盛
@ time: 2024/3/6 
@ file: 2.python 循环控制语句.py

"""
# if else
# for->计次  while->死循环->一定要有结束条件
# break->跳出当前循环   continue->继续下一次循环

for i in range(100):
    username = input("请输入用户名：")

    if username == "ljs":
        print("登录成功！")
        break
    else:
        print("用户名错误！请重新输入！")
print("程序结束！")

while True:
    username = input("请输入用户名：")

    if username == "ljs":
        print("登录成功！")
        break
    else:
        print("用户名错误！请重新输入！")
print("程序结束！")